package com.thon.service.project;

import java.util.List;
import java.util.Map;

import com.thon.dao.util.Page;
import com.thon.entity.project.Project;

/**
 * @file ProjectService.java
 * @author Zemo
 * @mail zemochen@gmail.com
 * @data 2013年10月16日 上午9:22:32
 * @description: TODO
 */
public interface ProjectService {

	public void addProject(Project project);

	public void updateProject(Project project);

	void deleteProject(Integer id);

	public Project getProject(int userId,int projectId);
	
	public Project getProject(int projectId);
	
	public Page<Project> findAllProject(int status,Integer userId,int pageNo,int pageSize,String querySt);
	
	public List<Project> listProjectByStatus(int status);
 
	public List<Project> listProjectsBy(String by,Object object);

	public Page<Project> findProjects(int userId,Integer status, int pageNo, int pageSize);

	public Page<Project> findProjectByAction(int userId, String action,int status,int pageNo, int pageSize);
	
	public Page<Project> findProjectSort(String by,int pageNo,int pageSize,int userId,int status);
	
	public Page<Project> findProjectByCategory(int categoryId, int pageNo,int pageSize,int userId,int status);
	
	public Page<Project> findProjectByRegion(int pageNo,int pageSize,int regionId,int status);

	public Long countProject(String by,int status);
	
	public Page<Project> findProjectByTags(int pageNo,int pageSize,String tags,int userId);
	
	public Project getProjectByInst(int institutionId,int status);
	
	public List<Project> listProjectsByStatus(int institutionId,int status);
	
	public Long countProjectByStatus(int institutionId,int status);
	
	public Long countProjectByCategory(int categoryId);
	
	public List<Project> listAllProjectName();
	
	public Page<Project> findProjectByCategory(Page<Project>page,int categoryId);
	
	public Page<Project> findProjectByBenefit(Page<Project>page,int benefitId);
	
	public Page<Project> findProjectByOpen(Page<Project>page,int openId);
	
	public Map<Integer,Integer> countCategoryAmount(Map<Integer,Integer> newCategoryAmount);
}